﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows;

namespace ObfuscarUtility
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            if (Environment.GetEnvironmentVariable(Assembly.GetExecutingAssembly().GetName().Name, EnvironmentVariableTarget.Machine) == null)
            {
                Environment.SetEnvironmentVariable(Assembly.GetExecutingAssembly().GetName().Name, Assembly.GetExecutingAssembly().Location, EnvironmentVariableTarget.Machine);
            }
            ConsoleTraceListener listener = new ConsoleTraceListener();
            if (Trace.Listeners.OfType<ConsoleTraceListener>().Count()==0)
            {
                Trace.Listeners.Add(listener);
            }

        }
    }
}
